#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>


void *Thread1(void *data)
{
	while(1){
		printf("_");fflush(stdout);
		sleep(1);
	}
}

void *Thread2(void *data)
{
	while(1){
		printf("-");fflush(stdout);
		sleep(1);
	}
}


int main()
{
    pthread_t objThread[2];

    pthread_create(&objThread[0], NULL, Thread1, NULL);
    pthread_create(&objThread[1], NULL, Thread2, NULL);	

    pthread_detach(objThread[0]);
	pthread_detach(objThread[1]);
    pause();
    return 0;
}
